var express = require("express");
var router = express.Router();
const Result = require("../utils/result");
const fansService = require("../services/fansService");

//获取关注列表
router.get("/followList", async function (req, res) {
  const noticerId = req.query.noticerId;
  const follows = await fansService.getFollowList(noticerId);
  res.json(Result.success({ follows }));
});

//获取粉丝列表
router.get("/fansList", async function (req, res) {
  const followerId = req.query.followerId;
  const fans = await fansService.getFansList(followerId);
  res.json(Result.success({ fans }));
});

module.exports = router;
